package com.wontube.client.extension.remote.session;

import java.util.List;

import com.wontube.client.modle.vo.ClientSession;

public interface ISessionHandler {
	/**
	 * session id
	 * 
	 * @return
	 */
	String getSessionId();
	
	/**
	 * all sessions
	 * 
	 * @return
	 */
	List<ClientSession> listSessions();
	
	/**
	 * all sessions count
	 * 
	 * @return
	 */
	int getSessionCount();
	
	/**
	 * get property of current session
	 * 
	 * @param key
	 * @return
	 */
	<T> T getProperty(String key);
	
	/**
	 * put property of current session
	 * 
	 * @param key
	 * @param value
	 * @return
	 */
	<T> boolean putProperty(String key, T value);
	
	/**
	 * list session by agent
	 * @param agent
	 * @return
	 */
	List<ClientSession> listSessions(String agent);
}
